import {
	request
} from "@/utils/request.js"

// 微信登录
export function loginByWeChat(data) {
	return request({
		url: '/XcxUser',
		method: "POST",
		data: data,
	})
}

// 修改用户名和头像
export function updateUserInfo(data) {
	return request({
		url: '/XcxUser/userInfo',
		method: "post",
		data: data,
	})
}

// 删除oss数据
export function deleteOssFile(data) {
	return request({
		url: "/XcxPageData/deleteBucketFile",
		method: "delete",
		data: data,
	});
}

// 获取收藏列表
export function getCollectList(data) {
	return request({
		url: '/UserFavorite/list',
		method: "get",
		data: data,
	})
}

// 获取用户的收藏数和上传数
export function getUserCount(data) {
	return request({
		url: '/XcxUser/' + data,
		method: "get",
	})
}

// 获取用户上传列表
export function getUserUploadList(data) {
	return request({
		url: '/UploadHistory/list',
		method: "get",
		data: data,
	})
}

// 获取返回关键词
export function getKeywordList(data) {
	return request({
		url: '/Material/keyword',
		method: "get",
		data: data,
	})
}

// 搜索素材
export function searchMaterial(data) {
	return request({
		url: '/Material/search',
		method: "post",
		data: data,
	})
}